package operator.filter;

import io.reactivex.Observable;
import io.reactivex.functions.Predicate;
import util.RxJavaHelper;

class OfTypeOperator {

    public static void main(String[] args) {
        ofType();
    }

    /**
     * 过滤想要的class类型
     */
    static void ofType(){
        Observable.just(1, "2", 2f, 4d)
                .ofType(Integer.class)
                .subscribe(RxJavaHelper.getConsumer());
    }


}
